# php项目启动基础镜像
FROM public-cn-beijing.cr.volces.com/public/base:php-7.4-fpm-nginx
# 将构建上下文内容拷贝至 /opt/application/目录下
COPY . /opt/application
RUN cp /opt/application/conf/nginx.conf /etc/nginx/conf.d/default.conf \
		&& cp /opt/application/conf/www.conf /usr/local/etc/php-fpm.d/www.conf \
		&& cp /opt/application/conf/zz-docker.conf /usr/local/etc/php-fpm.d/zz-docker.conf\
		&& mkdir -p /run/nginx \
		&& chmod -R 777 /opt/application/runtime \
		&& chmod -R 777 /opt/application/run.sh
CMD /opt/application/run.sh
